{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "fpath = \"C:/Users/YC111/Desktop/统计作业/movie_data.csv\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "movie= pd.read_csv(fpath)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>actors</th>\n",
       "      <th>average</th>\n",
       "      <th>country</th>\n",
       "      <th>director</th>\n",
       "      <th>genre</th>\n",
       "      <th>language</th>\n",
       "      <th>link</th>\n",
       "      <th>release_date</th>\n",
       "      <th>runtime</th>\n",
       "      <th>title</th>\n",
       "      <th>votes</th>\n",
       "      <th>writer</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>['蒂姆·罗宾斯', '摩根·弗里曼', '鲍勃·冈顿', '威廉姆·赛德勒', '克兰西·...</td>\n",
       "      <td>9.7</td>\n",
       "      <td>美国</td>\n",
       "      <td>弗兰克·德拉邦特</td>\n",
       "      <td>['剧情', '犯罪']</td>\n",
       "      <td>英语</td>\n",
       "      <td>https://movie.douban.com/subject/1292052/</td>\n",
       "      <td>1994-09-10(多伦多电影节)</td>\n",
       "      <td>142分钟</td>\n",
       "      <td>肖申克的救赎 The Shawshank Redemption</td>\n",
       "      <td>2083437.0</td>\n",
       "      <td>['弗兰克·德拉邦特', '斯蒂芬·金']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>['金妮弗·古德温', '杰森·贝特曼', '伊德里斯·艾尔巴', '珍妮·斯蕾特', '内...</td>\n",
       "      <td>9.2</td>\n",
       "      <td>美国</td>\n",
       "      <td>拜伦·霍华德</td>\n",
       "      <td>['喜剧', '动画', '冒险']</td>\n",
       "      <td>英语 / 挪威语</td>\n",
       "      <td>https://movie.douban.com/subject/25662329/</td>\n",
       "      <td>2016-03-04(中国大陆/美国)</td>\n",
       "      <td>109分钟(中国大陆)</td>\n",
       "      <td>疯狂动物城 Zootopia</td>\n",
       "      <td>1321807.0</td>\n",
       "      <td>['拜伦·霍华德', '瑞奇·摩尔', '杰拉德·布什', '吉姆·里尔顿', '乔西·特立...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>['汤姆·汉克斯', '罗宾·怀特', '加里·西尼斯', '麦凯尔泰·威廉逊', '莎莉·...</td>\n",
       "      <td>9.5</td>\n",
       "      <td>美国</td>\n",
       "      <td>罗伯特·泽米吉斯</td>\n",
       "      <td>['剧情', '爱情']</td>\n",
       "      <td>英语</td>\n",
       "      <td>https://movie.douban.com/subject/1292720/</td>\n",
       "      <td>1994-06-23(洛杉矶首映)</td>\n",
       "      <td>142分钟</td>\n",
       "      <td>阿甘正传 Forrest Gump</td>\n",
       "      <td>1573820.0</td>\n",
       "      <td>['艾瑞克·罗斯', '温斯顿·格鲁姆']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>['徐峥', '王传君', '周一围', '谭卓', '章宇', '杨新鸣', '王佳佳',...</td>\n",
       "      <td>9.0</td>\n",
       "      <td>中国大陆</td>\n",
       "      <td>文牧野</td>\n",
       "      <td>['剧情', '喜剧']</td>\n",
       "      <td>汉语普通话 / 英语 / 上海话 / 印地语</td>\n",
       "      <td>https://movie.douban.com/subject/26752088/</td>\n",
       "      <td>2018-07-05(中国大陆)</td>\n",
       "      <td>117分钟</td>\n",
       "      <td>我不是药神</td>\n",
       "      <td>1529042.0</td>\n",
       "      <td>['韩家女', '钟伟', '文牧野']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>['柊瑠美', '入野自由', '夏木真理', '菅原文太', '中村彰男', '玉井夕海'...</td>\n",
       "      <td>9.4</td>\n",
       "      <td>日本</td>\n",
       "      <td>宫崎骏</td>\n",
       "      <td>['剧情', '动画', '奇幻']</td>\n",
       "      <td>日语</td>\n",
       "      <td>https://movie.douban.com/subject/1291561/</td>\n",
       "      <td>2019-06-21(中国大陆)</td>\n",
       "      <td>125分钟</td>\n",
       "      <td>千与千寻 千と千尋の神隠し</td>\n",
       "      <td>1636148.0</td>\n",
       "      <td>['宫崎骏']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>['维果·莫腾森', '马赫沙拉·阿里', '琳达·卡德里尼', '塞巴斯蒂安·马尼斯科',...</td>\n",
       "      <td>8.9</td>\n",
       "      <td>美国</td>\n",
       "      <td>彼得·法雷里</td>\n",
       "      <td>['剧情', '喜剧', '传记']</td>\n",
       "      <td>英语 / 意大利语 / 俄语 / 德语</td>\n",
       "      <td>https://movie.douban.com/subject/27060077/</td>\n",
       "      <td>2019-03-01(中国大陆)</td>\n",
       "      <td>130分钟</td>\n",
       "      <td>绿皮书 Green Book</td>\n",
       "      <td>1109388.0</td>\n",
       "      <td>['尼克·瓦莱隆加', '布莱恩·库瑞', '彼得·法雷里']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>['莱昂纳多·迪卡普里奥', '凯特·温丝莱特', '比利·赞恩', '凯西·贝茨', '弗...</td>\n",
       "      <td>9.4</td>\n",
       "      <td>美国</td>\n",
       "      <td>詹姆斯·卡梅隆</td>\n",
       "      <td>['剧情', '爱情', '灾难']</td>\n",
       "      <td>英语 / 意大利语 / 德语 / 俄语</td>\n",
       "      <td>https://movie.douban.com/subject/1292722/</td>\n",
       "      <td>1998-04-03(中国大陆)</td>\n",
       "      <td>194分钟</td>\n",
       "      <td>泰坦尼克号 Titanic</td>\n",
       "      <td>1527182.0</td>\n",
       "      <td>['詹姆斯·卡梅隆']</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0                                             actors  average  \\\n",
       "0           0  ['蒂姆·罗宾斯', '摩根·弗里曼', '鲍勃·冈顿', '威廉姆·赛德勒', '克兰西·...      9.7   \n",
       "1           1  ['金妮弗·古德温', '杰森·贝特曼', '伊德里斯·艾尔巴', '珍妮·斯蕾特', '内...      9.2   \n",
       "2           2  ['汤姆·汉克斯', '罗宾·怀特', '加里·西尼斯', '麦凯尔泰·威廉逊', '莎莉·...      9.5   \n",
       "3           3  ['徐峥', '王传君', '周一围', '谭卓', '章宇', '杨新鸣', '王佳佳',...      9.0   \n",
       "4           4  ['柊瑠美', '入野自由', '夏木真理', '菅原文太', '中村彰男', '玉井夕海'...      9.4   \n",
       "5           5  ['维果·莫腾森', '马赫沙拉·阿里', '琳达·卡德里尼', '塞巴斯蒂安·马尼斯科',...      8.9   \n",
       "6           6  ['莱昂纳多·迪卡普里奥', '凯特·温丝莱特', '比利·赞恩', '凯西·贝茨', '弗...      9.4   \n",
       "\n",
       "  country  director               genre                 language  \\\n",
       "0      美国  弗兰克·德拉邦特        ['剧情', '犯罪']                       英语   \n",
       "1      美国    拜伦·霍华德  ['喜剧', '动画', '冒险']                 英语 / 挪威语   \n",
       "2      美国  罗伯特·泽米吉斯        ['剧情', '爱情']                       英语   \n",
       "3    中国大陆       文牧野        ['剧情', '喜剧']   汉语普通话 / 英语 / 上海话 / 印地语   \n",
       "4      日本       宫崎骏  ['剧情', '动画', '奇幻']                       日语   \n",
       "5      美国    彼得·法雷里  ['剧情', '喜剧', '传记']      英语 / 意大利语 / 俄语 / 德语   \n",
       "6      美国   詹姆斯·卡梅隆  ['剧情', '爱情', '灾难']      英语 / 意大利语 / 德语 / 俄语   \n",
       "\n",
       "                                         link         release_date  \\\n",
       "0   https://movie.douban.com/subject/1292052/   1994-09-10(多伦多电影节)   \n",
       "1  https://movie.douban.com/subject/25662329/  2016-03-04(中国大陆/美国)   \n",
       "2   https://movie.douban.com/subject/1292720/    1994-06-23(洛杉矶首映)   \n",
       "3  https://movie.douban.com/subject/26752088/     2018-07-05(中国大陆)   \n",
       "4   https://movie.douban.com/subject/1291561/     2019-06-21(中国大陆)   \n",
       "5  https://movie.douban.com/subject/27060077/     2019-03-01(中国大陆)   \n",
       "6   https://movie.douban.com/subject/1292722/     1998-04-03(中国大陆)   \n",
       "\n",
       "       runtime                            title      votes  \\\n",
       "0        142分钟  肖申克的救赎 The Shawshank Redemption  2083437.0   \n",
       "1  109分钟(中国大陆)                   疯狂动物城 Zootopia  1321807.0   \n",
       "2        142分钟                阿甘正传 Forrest Gump  1573820.0   \n",
       "3        117分钟                            我不是药神  1529042.0   \n",
       "4        125分钟                    千与千寻 千と千尋の神隠し  1636148.0   \n",
       "5        130分钟                   绿皮书 Green Book  1109388.0   \n",
       "6        194分钟                    泰坦尼克号 Titanic  1527182.0   \n",
       "\n",
       "                                              writer  \n",
       "0                              ['弗兰克·德拉邦特', '斯蒂芬·金']  \n",
       "1  ['拜伦·霍华德', '瑞奇·摩尔', '杰拉德·布什', '吉姆·里尔顿', '乔西·特立...  \n",
       "2                              ['艾瑞克·罗斯', '温斯顿·格鲁姆']  \n",
       "3                               ['韩家女', '钟伟', '文牧野']  \n",
       "4                                            ['宫崎骏']  \n",
       "5                    ['尼克·瓦莱隆加', '布莱恩·库瑞', '彼得·法雷里']  \n",
       "6                                        ['詹姆斯·卡梅隆']  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie.head(n=7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10440, 13)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "movie.shape"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.10 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "09738f47427dba2c99ec68f9759744be2c477c434791ae3d2ff19909b29a18a8"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
